﻿using Simple.Repository.Models.Article;

namespace Simple.Services.System.Article.Model
{
    public class ArticleCategoryOutPutModel : ModelBase
    {
        /// <summary>
        /// 文章分类主键Id
        /// </summary>
        public Guid? Id { get; set; } = null;

        /// <summary>
        /// 分类名称
        /// </summary>
        [Required(ErrorMessage = "请填写分类名称!")]
        public string? CategoryName { get; set; } = "";

        /// <summary>
        /// 是否显示
        /// </summary>
        public bool? IsShow { get; set; } = true;

        /// <summary>
        /// 排序
        /// </summary>
        public int SortValue { get; set; } = 0;

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; } = "";

        /// <summary>
        /// 文章集合
        /// </summary>
        public List<ArticleManage> ArticleManages = new List<ArticleManage>();

        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<ArticleCategory, ArticleCategoryOutPutModel>();

            profile.CreateMap<ArticleCategoryOutPutModel, ArticleCategory>();
        }
    }
}
